import type { App } from 'vue';

import { AButton } from '@/framework/components/basic/button/index';

import {
  Modal,
  Cascader,
  Switch,
  Table,
  Menu,
  Input,
  InputNumber,
  Form,
  Card,
  Checkbox,
  Radio,
  Col,
  Row,
  Select,
  DatePicker,
  Upload,
  Drawer,
  Progress,
  Tree,
  Tabs,
  Button,
  Image,
  Transfer,
} from 'ant-design-vue';

import 'ant-design-vue/dist/antd.css';
import 'dayjs/locale/zh-cn';

export function setupAntd(app: App<Element>) {
  app.component('AButton', AButton);

  app
    .use(Form)
    .use(Button)
    .use(Image)
    .use(Input)
    .use(Tree)
    .use(Modal)
    .use(Table)
    .use(Menu)
    .use(Transfer)
    .use(Card)
    .use(Checkbox)
    .use(Radio)
    .use(Col)
    .use(Row)
    .use(Select)
    .use(DatePicker)
    .use(Upload)
    .use(Drawer)
    .use(InputNumber)
    .use(Progress)
    .use(Cascader)
    .use(Switch)
    .use(Tabs);
}
